home *** CD-ROM | disk | FTP | other *** search
/ Atlas of Florida / Atlas of Florida.iso / Movies / 1.0 Introduction / 1.0 Introduction / 00242_Script_242 < prev    next >
Text File  |  1994-08-23  |  14KB  |  363 lines

  1. -- Distance return text popUp menu
  2.  
  3. on AlphabetMenu    --  a pop up menu returning item text
  4.   global  PopAlpha
  5.   
  6.   --  dispose of any previous instances, if any
  7.   if objectP( PopAlpha ) then PopAlpha( mDispose )
  8.   set menuList = the text of cast "DisMenList1"
  9.   --  Be sure to set parameter itemNum for PopNum or PopText to zero.
  10.   set PopAlpha = PopMenu(mNew,menuList, 216)
  11.   
  12.   if not objectP( PopAlpha ) then 
  13.     alert "PopMenu Object not made: " & string( PopAlpha )
  14.   end if
  15.   
  16.   --  to set automatic remembering of last item selected
  17.   PopAlpha(mSmart, 1 )
  18.   
  19.   --  PopMenu uses screen co÷rdinates, which must be changed
  20.   --  to window co÷rdinates with the StageLeft & stageTop functions
  21.   set sH = the left of sprite 6 + the stageLeft + 1
  22.   set sV = the top of sprite 6 + the stageTop + 1
  23.   
  24.   set result = PopAlpha(mPopText, sH, sV, 0)
  25.   if string( result ) = "" then exit
  26.   else set the text of cast "DisMen1" to "   " & string( result )
  27.   
  28.   MakeConversion
  29.   
  30.   -- dispose of this menu
  31.   if objectP( PopAlpha ) then PopAlpha( mDispose )
  32.   
  33. on AlphabetMenu2    --  a pop up menu returning item text
  34.   global  PopAlpha2
  35.   --  dispose of any previous instances, if any
  36.   if objectP( PopAlpha2 ) then PopAlpha2( mDispose )
  37.   set menuList = the text of cast "DisMenList2"
  38.   --  Be sure to set parameter itemNum for PopNum or PopText to zero.
  39.   set PopAlpha2 = PopMenu(mNew,menuList, 216)
  40.   
  41.   if not objectP( PopAlpha2 ) then 
  42.     alert "PopMenu Object not made: " & string( PopAlpha2 )
  43.   end if
  44.   
  45.   --  to set automatic remembering of last item selected
  46.   PopAlpha2(mSmart, 1 )
  47.   
  48.   --  PopMenu uses screen co÷rdinates, which must be changed
  49.   --  to window co÷rdinates with the StageLeft & stageTop functions
  50.   set sH = the left of sprite 9 + the stageLeft + 1
  51.   set sV = the top of sprite 9 + the stageTop + 1
  52.   
  53.   set result = PopAlpha2(mPopText, sH, sV, 0)
  54.   if string( result ) = "" then exit
  55.   else set the text of cast "DisMen2" to "   " & string( result )
  56.   
  57.   MakeConversion
  58.   
  59.   -- dispose of this menu
  60.   if objectP( PopAlpha2 ) then PopAlpha2( mDispose )
  61.   
  62.   
  63. on MakeConversion -- does conversion based on the menus and the entered value
  64.   showChannel 8
  65.   -- hide other answers
  66.   hideChannel 14
  67.   hideChannel 20
  68.   
  69.   put string(the text of cast "DisMen1") into menu1
  70.   put string(the text of cast "DisMen2") into menu2
  71.   put value(the text of cast "DisValue") into cValue -- entered by user
  72.   
  73.   put "?" into field "Answer"
  74.   
  75.   if menu1 =  "     in" then 
  76.     if menu2 =  "     in" then 
  77.       put cValue into field "Answer"
  78.       put cValue into field "AnswerString"
  79.     end if
  80.     if menu2 =  "     ft" then 
  81.       put ( cValue / 12.0) into field "Answer"
  82.       put cValue & " / 12" into field "AnswerString"
  83.     end if
  84.     if menu2 =  "     yd" then 
  85.       put ( cValue / 36.0 ) into field "Answer"
  86.       put cValue & " / 36" into field "AnswerString"
  87.     end if
  88.     if menu2 =  "     mi" then 
  89.       put ( (cValue / 12.0 ) / 5280.0 ) into field "Answer"
  90.       put "( " & cValue & " / 12 ) / 5280" into field "AnswerString"
  91.     end if
  92.     if menu2 =  "     mm   " then 
  93.       put ( cValue * 2.54 ) * 100.0 into Field "Answer"
  94.       put "( " & cValue & " * 2.54 ) * 100" into field "AnswerString"
  95.     end if
  96.     if menu2 =  "     cm" then 
  97.       put ( cValue * 2.54 ) into Field "Answer"
  98.       put  cValue & " * 2.54" into field "AnswerString"
  99.     end if
  100.     if menu2 =  "     m" then 
  101.       put ( (cValue * 2.54 ) / 100.0 ) into field "Answer"
  102.       put "( " & cValue & " * 2.54 ) / 100" into field "AnswerString"
  103.     end if
  104.     if menu2 =  "     km" then 
  105.       put  ( ( cvalue * 2.54 ) / 100.0 / 1000.0 ) into field "Answer"
  106.       put "( ( " & cValue & " * 2.54 ) / 100 ) / 1,000" into field "AnswerString"
  107.     end if
  108.   end if
  109.   
  110.   if menu1 =  "     ft" then 
  111.     if menu2 =  "     in" then 
  112.       put ( cValue * 12.0 ) into field "Answer"
  113.       put cValue & " * 12" into field "AnswerString"
  114.     end if
  115.     if menu2 =  "     ft" then 
  116.       put cValue into field "Answer"
  117.       put cValue into field "AnswerString"
  118.     end if
  119.     if menu2 =  "     yd" then 
  120.       put ( cValue / 3.0 ) into field "Answer"
  121.       put cValue & " / 3" into field "AnswerString"
  122.     end if
  123.     if menu2 =  "     mi" then 
  124.       put ( cValue / 5280.0 ) into field "Answer"
  125.       put cValue & " / 5280" into field "AnswerString"
  126.     end if
  127.     if menu2 =  "     mm   " then 
  128.       put ( cValue * .3048 ) * 100.0 * 100.0 into Field "Answer"
  129.       put "( ( " & cValue & " * .3048 ) * 100 ) * 100" into field "AnswerString"
  130.     end if
  131.     if menu2 =  "     cm" then 
  132.       put ( cValue * .3048 ) * 100.0 into Field "Answer"
  133.       put "( " & cValue & " * .3048 ) * 100" into field "AnswerString"
  134.     end if
  135.     if menu2 =  "     m" then 
  136.       put ( cValue * .3048 ) into field "Answer"
  137.       put cValue & " * .3048" into field "AnswerString"
  138.     end if
  139.     if menu2 =  "     km" then 
  140.       put  ( ( cValue * .3048 ) / 1000.0 ) into field "Answer"
  141.       put "( " & cValue & " * .3048 ) / 1,000" into field "AnswerString"
  142.     end if
  143.   end if
  144.   
  145.   if menu1 =  "     yd" then 
  146.     if menu2 =  "     in" then 
  147.       put ( cValue * 36.0 ) into field "Answer"
  148.       put cValue & " * 36" into field "AnswerString"
  149.     end if
  150.     if menu2 =  "     ft" then 
  151.       put ( cValue * 3.0 ) into field "Answer"
  152.       put cValue & " * 3" into field "AnswerString"
  153.     end if
  154.     if menu2 =  "     yd" then 
  155.       put cValue into field "Answer"
  156.       put cValue into field "AnswerString"
  157.     end if
  158.     if menu2 =  "     mi" then 
  159.       put ( cValue * 3.0 / 5280.0 ) into field "Answer"
  160.       put "( " & cValue & " * 3 ) / 5,280" into field "AnswerString"
  161.     end if
  162.     if menu2 =  "     mm   " then 
  163.       put ( ( cValue * .9144 ) * 100.0 ) * 100.0 into field "Answer"
  164.       put "( ( " & cValue & " * .9144 ) * 100 ) * 100" into field "AnswerString"
  165.     end if
  166.     if menu2 =  "     cm" then 
  167.       put ( ( cValue * .9144 ) * 100.0 ) into field "Answer"
  168.       put "( " & cValue & " * .9144 ) * 100" into field "AnswerString"
  169.     end if
  170.     if menu2 =  "     m" then 
  171.       put ( cValue * .9144 ) into field "Answer"
  172.       put cValue & " * .9144" into field "AnswerString"
  173.     end if
  174.     if menu2 =  "     km" then 
  175.       put  ( ( cValue * .9144 ) / 1000.0 ) into field "Answer"
  176.       put "( " & cValue & " * .9144 ) / 1,000" into field "AnswerString"
  177.     end if
  178.   end if
  179.   
  180.   
  181.   if menu1 =  "     mi" then 
  182.     if menu2 =  "     in" then 
  183.       put ( cValue * 5280.0 * 12.0 ) into field "Answer"
  184.       put "( " & cValue & " * 5,280 ) * 12" into field "AnswerString"
  185.     end if
  186.     if menu2 =  "     ft" then 
  187.       put ( cValue * 5280.0 ) into field "Answer"
  188.       put cValue & " * 5,280" into field "AnswerString"
  189.     end if
  190.     if menu2 =  "     yd" then 
  191.       put ( ( cValue * 5280.0 ) / 3.0 ) into field "Answer"
  192.       put "( " & cValue & " * 5,280 ) / 3" into field "AnswerString"
  193.     end if
  194.     if menu2 =  "     mi" then 
  195.       put cValue into field "Answer"
  196.       put cValue into field "AnswerString"
  197.     end if
  198.     if menu2 =  "     mm   " then 
  199.       put ( cValue * 1.6093 ) * 1000.0 * 100.0 * 100.0 into field "Answer"
  200.       put "( ( ( " & cValue & " * 1.6093 ) 1,000 ) * 100 ) * 100" into field "AnswerString"
  201.     end if
  202.     if menu2 =  "     cm" then 
  203.       put ( cValue * 1.6093 ) * 1000.0 * 100.0 into field "Answer"
  204.       put "( ( " & cValue & " * 1.6093 ) * 1,000 ) * 100" into field "AnswerString"
  205.     end if
  206.     if menu2 =  "     m" then 
  207.       put ( cValue * 1.6093 ) * 1000.0 into field "Answer"
  208.       put "( " & cValue & " * 1.6093 ) * 1,000" into field "AnswerString"
  209.     end if
  210.     if menu2 =  "     km" then 
  211.       put  ( cValue * 1.6093 )  into field "Answer"
  212.       put cValue & " * 1.6093" into field "AnswerString"
  213.     end if
  214.   end if
  215.   
  216.   if menu1 =  "     mm   " then  
  217.     if menu2 =  "     in" then 
  218.       put ( cValue * 0.03937 ) into field "Answer"
  219.       put cValue & " * .03937" into field "AnswerString"
  220.     end if
  221.     if menu2 =  "     ft" then